package com.team06.login.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.team06.login.entity.Role;
import com.team06.login.entity.User;
import org.springframework.security.core.userdetails.UserDetailsService;

import java.util.List;

public interface UserService extends IService<User>, UserDetailsService {
    List<User> listAllUsers();
    boolean deleteUserById(Long id);
    void assignRolesToUser(Long userId, List<Long> roleIds);
    void removeAllRolesFromUser(Long userId);
    List<Role> getUserRoles(Long userId);
    boolean existsByUsername(String username);
    boolean existsByEmail(String email);
    User findByEmail(String email);
    List<User> searchByUsername(String username); // 新增模糊查询方法
}